import Vue from 'vue'
import App from './App.vue'
import router from './router'
import moment from 'moment'
import './plugins/element.js'
// 导入全局样式
import './assets/css/common.css'
// 导入字体样式
import './assets/fonts/iconfont.css'
// MyBread其实是组件选项所在的对象{template:'',data等}
import MyBread from './components/cuscom/MyBread.vue'

import MyHttpServer from './plugins/http.js'
Vue.use(MyHttpServer)
/*
import axios from 'axios'
// 设置基准的url
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
axios.interceptors.request.use(config => {
  // 请求对象添加Authorization
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
Vue.prototype.$http = axios */

Vue.config.productionTip = false
// 全局过滤器 - 处理日期
Vue.filter('fmtDate', (v) => {
  return moment(v).format('YYYY-MM-DD')
})

Vue.component(MyBread.name, MyBread)
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
